export const exportColumnCollege = [
    {
        title: '用户名',
        key: 'username',
        minWidth: 125,
        sortable: true
        //fixed: "left",
    },
    {
        title: '姓名',
        key: 'name',
        minWidth: 125,
        sortable: true,
        //fixed: "left",
        render: (h, params) => {
            return h(
                'a',
                {
                    on: {
                        click: () => {
                            this.showDetail(params.row);
                        }
                    }
                },
                params.row.name
            );
        }
    },
    // {
    //   title: "所在高校",
    //   key: "gxcode",
    //   minWidth: 120,
    //   sortable: false,
    // },
    // {
    //   title: "所在院系",
    //   key: "yxcode",
    //   minWidth: 120,
    //   sortable: false,
    // },

    {
        title: '管理学院',
        key: 'yxcode',
        minWidth: 120,
        render: (h, params) => {
            let dict = '';
            this.yxList.forEach(item => {
                if (params.row.yxcode) {
                    let yxcode = params.row.yxcode.split(',');
                    yxcode.forEach(e => {
                        if (item.yxcode === e) {
                            dict += item.yxname + ',';
                        }
                    });
                }
            });
            return h('p', dict ? dict.slice(0, dict.length - 1) : '');
        }
    },
    {
        title: '角色',
        key: 'roles',
        minWidth: 120,
        render: (h, params) => {
            let dict = '';
            this.roleList.forEach(item => {
                if (params.row.roles) {
                    params.row.roles.forEach(e => {
                        if (item.name === e.name) {
                            dict += item.description + ',';
                        }
                    });
                }
            });
            return 1;
        }
    },
    {
        title: '管理的学历层次',
        key: 'glxlcc',
        minWidth: 120,
        sortable: false,
        render: (h, params) => {
            let dict = '';
            this.glxlccList.forEach(item => {
                if (params.row.glxlcc) {
                    let glxlcc = params.row.glxlcc.split(',');
                    glxlcc.forEach(e => {
                        if (item.value === e) {
                            dict += item.title + ',';
                        }
                    });
                }
            });
            return h('p', dict ? dict.slice(0, dict.length - 1) : '');
        }
    },
    {
        title: '职务',
        key: 'zw',
        minWidth: 120,
        sortable: false
    },
    {
        title: '电话',
        key: 'telephone',
        minWidth: 120,
        sortable: false
    },
    {
        title: '手机',
        key: 'mobile',
        minWidth: 125,
        sortable: true
    },
    {
        title: '传真',
        key: 'fax',
        minWidth: 120,
        sortable: false
    },
    {
        title: '邮箱',
        key: 'email',
        minWidth: 180,
        sortable: true
    },
    {
        title: 'QQ',
        key: 'qq',
        minWidth: 120,
        sortable: false
    },
    {
        title: '排序号',
        key: 'sortorder',
        minWidth: 120,
        sortable: true,
        sortType: 'asc'
    },
    {
        title: '状态',
        key: 'status',
        align: 'center',
        minWidth: 100,
        render: (h, params) => {
            if (params.row.status == 0) {
                return h('div', [
                    h('Badge', {
                        props: {
                            status: 'success',
                            text: '启用'
                        }
                    })
                ]);
            } else if (params.row.status == -1) {
                return h('div', [
                    h('Badge', {
                        props: {
                            status: 'error',
                            text: '禁用'
                        }
                    })
                ]);
            }
        },
        filters: [
            {
                label: '启用',
                value: 0
            },
            {
                label: '禁用',
                value: -1
            }
        ],
        filterMultiple: false,
        filterRemote: e => {
            let v = '';
            if (e.length > 0) {
                v = e[0];
            }
            this.searchForm.status = v;
            this.searchForm.pageNumber = 1;
            this.getDataList();
        }
    },
    {
        title: '创建时间',
        key: 'createTime',
        sortable: true,
        sortType: 'desc',
        minWidth: 180
    }
];
